package com.List集合.demo;

import java.util.LinkedList;
/*结果
Student(name=ll, age=15)
Student(name=lppl, age=15)
Student(name=lllkk, age=15)
 */
public class LinkedListStudent {
    public static void main(String[] args) {
        Student s1 = new Student("ll",15);
        Student s2 = new Student("lppl",15);
        Student s3= new Student("lllkk",15);

        LinkedList<Student> studentLinkedList = new LinkedList<>();
        studentLinkedList.add(s1);
        studentLinkedList.add(s2);
        studentLinkedList.add(s3);

        for (Student student : studentLinkedList) {
            System.out.println(student);
        }

    }
}
